<!--
 * @Author: your name
 * @Date: 2022-12-07 17:15:08
 * @LastEditTime: 2022-12-07 17:49:11
 * @LastEditors: yuhan
 * @Description: 
 * @FilePath: \ft-apiadmin\apiadmin\src\components\RefreshBtn\index.vue
-->
<template>
  <el-button type="success" plain :icon="Refresh" @click="handleRefresh">刷新页面</el-button>
</template>
<script setup>
import { Refresh } from "@element-plus/icons-vue";
import { useStore } from "vuex";
import { nextTick } from "vue";
const store = useStore();
const handleRefresh = () => {
  store.dispatch("setting/setRouterView", false);
  nextTick(() => {
    store.dispatch("setting/setRouterView", true);
  });
};
</script>
<style lang="scss" scoped></style>
